<template>
	<div class="feedback">
		<div class="header">
			意见反馈
			<el-button @click="goback()">返回</el-button>
		</div>
		<div class="body">
			<span class="title">
				<img src="./img/2.png" alt="">
				问题描述
			</span>
			<textarea v-model="description" value="description" placeholder="请告诉我们你遇到的问题" name="" id="" cols="30" rows="10"></textarea>
			<span class="title">
				<img src="./img/2.png" alt="">
				联系方式
			</span>
			<input type="text" v-model="contactWay" value="contactWay" placeholder="请输入你的联系方式">
			<div class="success">
				<el-button @click="save()" type="primary">提交</el-button>
			</div>
		</div>
	</div>
</template>
<script>
	export default{
		name:'feedback',
		data(){
			return{
				description:'',
				contactWay:'',
				message:0
			}
		},
		methods:{
			save(){
				if (this.description==''||this.contactWay=='') {
					this.$message.error("请输入内容")
					return
				};
				this.$http.post('vrv-monitor-platform-web/feedback/insert',{
					description:this.description,
					contactWay:this.contactWay
				}).then(res=>{
					if (res.body.success==true) {
						this.$message("提交成功")
					};
				})
			},
			goback(){
				this.$router.back(-1)
			}
		}
	}
</script>
<style scoped>
	.feedback{
		min-height: 100%;
		background: #fff;
		padding: 1.85rem;
		margin-right: 1.8rem;
	}
	.header{
		height: 2.8rem;
		font-size: 1.4rem;
		color: #555;
		font-weight: bold;
		border-bottom: 1px solid #dcdcdc;
	}
	.header button{
		float: right;
		width: 5rem;
	}
	.body{
		width: 33rem;
		margin: 0 auto;
		
	}
	.title{
		margin-top: 2rem;
		margin-bottom: 1.6rem;
		display: block;
		font-size: 0.88rem;
		color: #000;
		font-weight: 400;
		transform:translateX(-2.25rem);
	}
	.body .title img{
		margin-right: 1.3rem;
		vertical-align: top;
		/*margin-top: 0.10rem;*/
	}
	textarea{
		width: 100%;
		border:1px solid #dcdcdc;
		height: 240px;
		padding: 2px 5px;
	}
	input{
		width: 100%;
		border: 1px solid #dcdcdc;
		height:1.88rem;
		border-radius: 0.25rem;
		padding: 0.12rem 0.3rem;
	}
	.success{
		padding: 1.5rem 0;
		height: 2.5rem;
		text-align: center;
	}
	.success button{
		width: 9.3rem;
	}


</style>